import {
	computed
} from 'vue'
import {
	useAppStore
} from '@/store/store.js'

export function useDefaultAddress(address) {
	const store = useAppStore()
	const addressList = store.address
	const defaultAddress = addressList.filter(item => item.checked)[0]
	return computed(() => {
		return {
			state: address?.uuid === defaultAddress?.uuid,
			data: defaultAddress
		}
	})
}